package demo.messaging.common;

import java.io.Serializable;

public class ServiceException extends Exception implements Serializable {

	public static final String USERNAME_ALREADY_IN_USE = "The user name is already in used";

	public static final String DISTINATION_LOST_CONNECTION = "The user has lost connection.";

	public static final String LOST_CONNECTION = "You are disconnected ! Please log in again.";

	String errorId;

	/**
	 * Necessary for GWT.
	 */
	public ServiceException() {

	}

	public ServiceException(final String errorId) {
		super(errorId);
		this.errorId = errorId;
	}

	public ServiceException(final String errorId, final String friendlyMessage) {
		super(friendlyMessage);
		this.errorId = errorId;
	}

	public String getErrorId() {
		return this.errorId;
	}

}
